home *** CD-ROM | disk | FTP | other *** search
/ PC User 2004 November / PCU1104CD2.iso / software / browsers / files / QBrows.exe / {app} / QBrowser.chm / dom / dispatch.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2004-03-13  |  5.3 KB  |  249 lines

  1. <?xml version="1.0"?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
  3.  
  4. <xsl:template match="/">
  5.    <xsl:apply-templates />
  6. </xsl:template>
  7.  
  8. <xsl:template match="Object">
  9.   <HTML>
  10.     <HEAD>
  11.       <TITLE><xsl:value-of select="@project" /> : Object <xsl:value-of select="@name" /></TITLE>
  12.       <META NAME="Description" CONTENT="{Description}" />
  13.       <META NAME="Keywords"  CONTENT="{Keywords}" />
  14.       <STYLE>
  15. CODE {
  16.     font-size: x-small;
  17.     font-family: "courier new",monospace;
  18. }
  19.  
  20. TT {
  21.     font-size: x-small;
  22. }
  23.  
  24. TABLE {
  25.     padding: 2pt;
  26. }
  27.  
  28. TH {
  29.     font-weight: bold;
  30.     text-align: left;
  31.     vertical-align: top;
  32. }
  33.  
  34. DL {
  35.     margin-bottom: 0;
  36. }
  37.  
  38. DT.param {
  39.     font-style: italic;
  40.     font-weight: bold;
  41. }
  42.  
  43. DT.method {
  44.     font-weight: bold;
  45. }
  46.  
  47. DT.property {
  48.     font-weight: bold;
  49. }
  50.  
  51. .index {
  52.     font-size: medium
  53. }
  54.  
  55. .footer {
  56.     font-size: xx-small
  57. }
  58.  
  59. DT, DD, P, LI, TD, TH {
  60.     font-family: sans-serif;
  61.     font-size: 10pt;
  62. }
  63.  
  64. H1 {
  65.     font-size: 14pt
  66. }
  67.  
  68. H2 {
  69.     font-size: 12pt
  70. }
  71.  
  72. H3 {
  73.     font-size: 11pt
  74. }
  75.  
  76. BODY {
  77.     color: black;
  78.     font-family: sans-serif;
  79.     background-color: white;
  80. }
  81.  
  82. A.extern:link {
  83.     color: blue;
  84. }
  85.  
  86. A:link    {color: green}
  87. A:visited {color: gray}
  88. A:active  {color: #CC0000}
  89.       </STYLE>
  90.     </HEAD>
  91.     <BODY>
  92.       <H1><xsl:value-of select="@name" /> Object</H1>
  93.  
  94.       <P><xsl:value-of select="Description"/></P>
  95.  
  96.       <xsl:if test="Property">
  97.         <H2>Properties</H2>
  98.         <UL>
  99.           <xsl:for-each select="Property">
  100.             <LI>
  101.               <xsl:element name="A">
  102.                 <xsl:attribute name="HREF">#<xsl:value-of select="@name"/></xsl:attribute>
  103.                 <xsl:value-of select="@name"/></xsl:element>:
  104.               <xsl:value-of select="@type"/>
  105.             </LI>
  106.           </xsl:for-each>
  107.         </UL>
  108.       </xsl:if>
  109.    
  110.       <xsl:if test="Method">
  111.         <H2>Methods</H2>
  112.         <UL>
  113.           <xsl:for-each select="Method">
  114.             <LI>
  115.               <xsl:element name="A">
  116.                 <xsl:attribute name="HREF">#<xsl:value-of select="@name"/></xsl:attribute>
  117.                 <xsl:value-of select="@name"/></xsl:element>
  118.             </LI>
  119.           </xsl:for-each>
  120.         </UL>
  121.       </xsl:if>
  122.  
  123.       <xsl:if test="Event">
  124.         <H2>Events</H2>
  125.         <UL>
  126.           <xsl:for-each select="Event">
  127.             <LI>
  128.               <xsl:element name="A">
  129.                 <xsl:attribute name="HREF">#<xsl:value-of select="@name"/></xsl:attribute>
  130.                 <xsl:value-of select="@name"/></xsl:element>
  131.             </LI>
  132.           </xsl:for-each>
  133.         </UL>
  134.       </xsl:if>
  135.  
  136.       <xsl:if test="Example">
  137.         <H2>Example</H2>
  138.         <PRE>
  139.           <xsl:value-of select="Example"/>
  140.         </PRE>
  141.       </xsl:if>
  142.  
  143.       <HR />
  144.  
  145.       <xsl:apply-templates/>
  146.  
  147.     </BODY>
  148.   </HTML>
  149. </xsl:template>
  150.  
  151. <xsl:template match="Method">
  152.    <xsl:element name="A">
  153.      <xsl:attribute name="NAME">#<xsl:value-of select="@name"/></xsl:attribute>
  154.    </xsl:element>
  155.  
  156.    <H2><xsl:value-of select="@name" /> Method</H2>
  157.    <P><xsl:value-of select="Description" /></P>
  158.  
  159.    <H3>Syntax</H3>
  160.    <P><xsl:value-of select="Syntax" /></P>
  161.  
  162.    <xsl:if test="Return">
  163.      <H3>Return value</H3>
  164.      <xsl:apply-templates select="Return"/>
  165.    </xsl:if>
  166.  
  167.    <xsl:if test="Parameter">
  168.      <H3>Parameters</H3>
  169.      <P>
  170.        <DL>
  171.          <xsl:apply-templates select="Parameter"/>
  172.        </DL>
  173.      </P>
  174.    </xsl:if>
  175.  
  176.    <HR />
  177. </xsl:template>
  178.  
  179. <xsl:template match="Property">
  180.    <xsl:element name="A">
  181.      <xsl:attribute name="NAME">#<xsl:value-of select="@name"/></xsl:attribute>
  182.    </xsl:element>
  183.  
  184.    <H2><xsl:value-of select="@name" /> Property</H2>
  185.    <P><xsl:value-of select="Description" /></P>
  186.    <P>Type:
  187.      <xsl:choose>
  188.        <xsl:when test="@xlink">
  189.          <xsl:element name="A">
  190.            <xsl:attribute name="HREF"><xsl:value-of select="@type"/>.xml</xsl:attribute>
  191.            <xsl:value-of select="@type"/>
  192.          </xsl:element>
  193.        </xsl:when>
  194.        <xsl:otherwise>
  195.          <xsl:value-of select="@type" />
  196.        </xsl:otherwise>
  197.      </xsl:choose>
  198.    </P>
  199.    <HR />
  200. </xsl:template>
  201.  
  202. <xsl:template match="Event">
  203.    <xsl:element name="A">
  204.      <xsl:attribute name="NAME">#<xsl:value-of select="@name"/></xsl:attribute>
  205.    </xsl:element>
  206.  
  207.    <H2><xsl:value-of select="@name" /> Event</H2>
  208.    <P><xsl:value-of select="Description" /></P>
  209.  
  210.    <H3>Syntax</H3>
  211.    <P><xsl:value-of select="Syntax" /></P>
  212.  
  213.    <H3>Return value</H3>
  214.    <P>Type: <xsl:value-of select="Return/@type" /></P>
  215.  
  216.    <H3>Parameters</H3>
  217.    <DL>
  218.      <xsl:for-each select="Parameter">
  219.        <DT><xsl:value-of select="@name"/>: <xsl:value-of select="@type"/></DT>
  220.        <DD><xsl:value-of select="Description"/></DD>
  221.      </xsl:for-each>
  222.    </DL>
  223.  
  224.    <HR />
  225. </xsl:template>
  226.  
  227. <xsl:template match="Parameter">
  228.   <DT><xsl:value-of select="@name"/>: <xsl:value-of select="@type"/></DT>
  229.   <DD><xsl:value-of select="Description"/></DD>
  230. </xsl:template>
  231.  
  232. <xsl:template match="Return">
  233.    <P>Type:
  234.      <xsl:choose>
  235.        <xsl:when test="@xlink">
  236.          <xsl:element name="A">
  237.            <xsl:attribute name="HREF"><xsl:value-of select="@type"/>.xml</xsl:attribute>
  238.            <xsl:value-of select="@type"/>
  239.          </xsl:element>
  240.        </xsl:when>
  241.        <xsl:otherwise>
  242.          <xsl:value-of select="@type" />
  243.        </xsl:otherwise>
  244.      </xsl:choose>
  245.    </P>
  246. </xsl:template>
  247.  
  248. </xsl:stylesheet>
  249.